import { createSlice } from "@reduxjs/toolkit"

export const infoSlice = createSlice({
	name: "info",
	initialState: {
		userInfo: null,
		city: null,
	},
	reducers: {
		changeUserInfo(state, { payload }) {
			state.userInfo = payload
		},
		changeCityInfo(state, { payload }) {
			state.city = payload
		},
	},
})

export const { changeUserInfo, changeCityInfo } = infoSlice.actions

export default infoSlice.reducer
